#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN

#include <boost/test/included/unit_test.hpp>
#include <boost/gil/gil_all.hpp>

#include "../ged/ImageLayer.hpp"

using namespace ged;

BOOST_AUTO_TEST_SUITE( test_ImageLayer )

BOOST_AUTO_TEST_CASE( test_case_1 )
{
	GILPoint dims(13, 31);
	PGILImage p_image(new GILImage(dims));
	ImageLayer layer(p_image);

	BOOST_CHECK(dims == layer.getDimensions());
}

BOOST_AUTO_TEST_CASE( test_case_2 )
{
	PGILImage p_image(new GILImage);
	ImageLayer layer(p_image);

	GILPoint offset(13, 31);
	layer.setOffset(offset);
	BOOST_CHECK(offset == layer.getOffset());
}

BOOST_AUTO_TEST_CASE( test_case_3 )
{
	PGILImage p_image(new GILImage);
	ImageLayer layer(p_image);

	ImageLayer::view_type view;
	view = boost::gil::rotated90cw_view(layer.getView());
	layer.setView(view);
	BOOST_CHECK(view == layer.getView());
}

BOOST_AUTO_TEST_SUITE_END()
